package club.justwill.single.persistence.support;

import java.io.Serializable;

/**
 * Created by xiangnan on 16-1-29.
 */
public class UserAliasesPK implements Serializable {
    public UserAliasesPK() {}
    private Long userId;
    private Integer type;

    @Override
    public int hashCode() {
        int result = 17;
        result = 37 * result + (int) (userId ^ (userId >>> 32));
        result = 37 * result + (int) (type ^ (type >>> 32));
        return result;
    }

    @Override
    public boolean equals(Object o) {
        if (!(o instanceof UserAliasesPK))
            return false;
        UserAliasesPK unit = (UserAliasesPK) o;
        return unit.userId == userId
                && unit.type == type;
    }

    public Boolean canEqual(Object other) {
        return other instanceof UserAliasesPK;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }
}
